package com.vastcom.sigma.admin.dao;

import com.vastcom.sigma.admin.model.Encapsulation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface EncapsulationDao extends JpaRepository<Encapsulation,String> {

   /* @Query("select c from Bakerecord c where c.clqk=:cargocateid ")
    List<Bakerecord> getBakerecordsByClqk(@Param("cargocateid") String cargocateid);*/

   @Query("select e from Encapsulation e where e.clqk=:clqk order by e.fzsj desc ")
    List<Encapsulation> getEncapsulationsByClqk(@Param("clqk")String clqk);

   @Query("select e from Encapsulation e  order by e.fzsj desc ")
    List<Encapsulation> getEncapsulations();

  @Query("select e from Encapsulation e where e.scpc=:scpc")
    List<Encapsulation> getEncapsulationsByScpc(@Param("scpc")String scpc);

}
